import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;
import javax.swing.LayoutStyle;
import javax.swing.SwingConstants;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;

/**
 * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI
 * Builder, which is free for non-commercial use. If Jigloo is being used
 * commercially (ie, by a corporation, company or business for any purpose
 * whatever) then you should purchase a license for each developer using Jigloo.
 * Please visit www.cloudgarden.com for details. Use of Jigloo implies
 * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN
 * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR
 * ANY CORPORATE OR COMMERCIAL PURPOSE.
 */
public class Form_Statistics extends javax.swing.JFrame {

	{
		// Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	private JButton jButton_OK;
	private JLabel jLabel_no_additions;
	private JTextField jTextField_add_operations;
	private JTextField jTextField_mul_operations;
	private JLabel jLabel1;
	private JTextField jTextField_ram_accesses;
	private JLabel jLabel_ram_accesses;
	private JTextField jTextField_ADM;
	private JTextField jTextField_MAC;
	private JTextField jTextField_right_shift;
	private JTextField jTextField_left_shift;
	private JTextField jTextField_cfus_configured;
	private JTextField jTextField_register_accesses;
	private JLabel jLabel_NOP_operations;
	private JLabel jLabel_ADM_operations;
	private JLabel jLabel_right_shift_operations;
	private JLabel jLabel_left_operations;
	private JLabel jLabel_MAC_operations;
	private JTextField jTextField_NOP_operations;
	private JLabel jLabel_CFUs_reconfigurations;
	private JLabel jLabel_register_accesses;

	/**
	 * Auto-generated main method to display this JFrame
	 */
//	public static void main(String[] args) {
//		SwingUtilities.invokeLater(new Runnable() {
//			public void run() {
//				Form_Statistics inst = new Form_Statistics();
//				inst.setLocationRelativeTo(null);
//				inst.setVisible(true);
//			}
//		});
//	}

	public Form_Statistics() {
		super();
		initGUI();

		jTextField_register_accesses.setText(Integer
				.toString(Cfu.Register_Accesses));
		jTextField_ram_accesses.setText(Integer.toString(Ram.RAM_accesses));
		jTextField_cfus_configured.setText(Integer
				.toString(Cfu.CFUs_Reconfigurations));
		jTextField_NOP_operations.setText(Integer.toString(Cfu.NOP_Operations));
		jTextField_add_operations.setText(Integer.toString(Cfu.Add_Operations));
		jTextField_mul_operations.setText(Integer.toString(Cfu.MUL_Operations));
		jTextField_left_shift.setText(Integer
				.toString(Cfu.Shift_Left_Operations));
		jTextField_right_shift.setText(Integer
				.toString(Cfu.Shift_Right_Operations));
		jTextField_MAC.setText(Integer.toString(Cfu.MAC_Operations));
		jTextField_ADM.setText(Integer.toString(Cfu.ADM_Operations));
		

	}

	private void initGUI() {
		try {
			GroupLayout thisLayout = new GroupLayout((JComponent)getContentPane());
			getContentPane().setLayout(thisLayout);
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				jButton_OK = new JButton();
				jButton_OK.setText("OK");
				jButton_OK.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						// System.out.println("jButton_OK.actionPerformed, event="+evt);
						// TODO add your code for jButton_OK.actionPerformed

						dispose();

					}
				});
			}
			{
				jLabel_ram_accesses = new JLabel();
				jLabel_ram_accesses.setText("Number of RAM Accesses");
			}
			{
				jTextField_ram_accesses = new JTextField();
				jTextField_ram_accesses.setText(Integer.toString(Cfu.Register_Accesses));
				jTextField_ram_accesses.setEditable(false);
			}
			{
				jTextField_cfus_configured = new JTextField();
				jTextField_cfus_configured.setEditable(false);
			}
			{
				jTextField_add_operations = new JTextField();
				jTextField_add_operations.setEditable(false);
			}
			{
				jTextField_NOP_operations = new JTextField();
				jTextField_NOP_operations.setEditable(false);
			}
			{
				jLabel_ADM_operations = new JLabel();
				jLabel_ADM_operations
						.setText("Number of ADM operations performed");
			}
			{
				jTextField_left_shift = new JTextField();
				jTextField_left_shift.setEditable(false);
			}
			{
				jTextField_right_shift = new JTextField();
				jTextField_right_shift.setEditable(false);
			}
			{
				jTextField_MAC = new JTextField();
				jTextField_MAC.setEditable(false);
			}
			{
				jTextField_ADM = new JTextField();
				jTextField_ADM.setEditable(false);
			}
			{
				jLabel_CFUs_reconfigurations = new JLabel();
				jLabel_CFUs_reconfigurations
						.setText("Number of times CFUs reconfigured");
			}
			{
				jLabel_no_additions = new JLabel();
				jLabel_no_additions
						.setText("Number of Addition operations performed");
			}
			{
				jLabel_MAC_operations = new JLabel();
				jLabel_MAC_operations
						.setText("Number of MAC operations performed");
			}
			{
				jTextField_register_accesses = new JTextField();
				jTextField_register_accesses.setEditable(false);
			}
			{
				jLabel_left_operations = new JLabel();
				jLabel_left_operations
						.setText("Number of Logical Left Shift operations performed");
			}
			{
				jLabel_right_shift_operations = new JLabel();
				jLabel_right_shift_operations
						.setText("Number of Logical Right Shift operations performed");
			}
			{
				jLabel_NOP_operations = new JLabel();
				jLabel_NOP_operations
						.setText("Number of NOP operations performed");
			}
			{
				jLabel_register_accesses = new JLabel();
				jLabel_register_accesses.setText("Number of Register Accesses");
			}
			{
				jLabel1 = new JLabel();
				jLabel1.setText("Number of Multiplication operations performed");
			}
			{
				jTextField_mul_operations = new JTextField();
				jTextField_mul_operations.setEditable(false);
			}
			thisLayout.setVerticalGroup(thisLayout.createSequentialGroup()
				.addContainerGap(24, 24)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(jTextField_register_accesses, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jLabel_register_accesses, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(jTextField_ram_accesses, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jLabel_ram_accesses, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(jTextField_cfus_configured, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jLabel_CFUs_reconfigurations, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(jTextField_NOP_operations, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jLabel_NOP_operations, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addGap(48)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(jTextField_mul_operations, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jLabel1, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addGap(46)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(jTextField_add_operations, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jLabel_no_additions, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addGap(27)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(jTextField_left_shift, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jLabel_left_operations, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addGap(27)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(jTextField_right_shift, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jLabel_right_shift_operations, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(jTextField_MAC, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jLabel_MAC_operations, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(jTextField_ADM, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jLabel_ADM_operations, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addGap(21)
				.addComponent(jButton_OK, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
			thisLayout.setHorizontalGroup(thisLayout.createSequentialGroup()
				.addContainerGap()
				.addGroup(thisLayout.createParallelGroup()
				    .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				        .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, 277, GroupLayout.PREFERRED_SIZE)
				        .addGap(12))
				    .addGroup(thisLayout.createSequentialGroup()
				        .addPreferredGap(jLabel1, jLabel_ADM_operations, LayoutStyle.ComponentPlacement.INDENT)
				        .addGroup(thisLayout.createParallelGroup()
				            .addComponent(jLabel_ADM_operations, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 277, GroupLayout.PREFERRED_SIZE)
				            .addComponent(jLabel_MAC_operations, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 277, GroupLayout.PREFERRED_SIZE)
				            .addComponent(jLabel_right_shift_operations, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 277, GroupLayout.PREFERRED_SIZE)
				            .addComponent(jLabel_left_operations, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 277, GroupLayout.PREFERRED_SIZE)
				            .addComponent(jLabel_no_additions, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 277, GroupLayout.PREFERRED_SIZE)
				            .addComponent(jLabel_NOP_operations, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 277, GroupLayout.PREFERRED_SIZE)
				            .addComponent(jLabel_CFUs_reconfigurations, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 277, GroupLayout.PREFERRED_SIZE)
				            .addComponent(jLabel_ram_accesses, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 277, GroupLayout.PREFERRED_SIZE)
				            .addComponent(jLabel_register_accesses, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 277, GroupLayout.PREFERRED_SIZE)
				            .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				                .addGap(230)
				                .addComponent(jButton_OK, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)))))
				.addGap(46)
				.addGroup(thisLayout.createParallelGroup()
				    .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				        .addComponent(jTextField_ADM, GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE)
				        .addGap(0, 7, Short.MAX_VALUE))
				    .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				        .addComponent(jTextField_MAC, GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE)
				        .addGap(0, 7, Short.MAX_VALUE))
				    .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				        .addComponent(jTextField_right_shift, GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE)
				        .addGap(0, 7, Short.MAX_VALUE))
				    .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				        .addComponent(jTextField_left_shift, GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE)
				        .addGap(0, 7, Short.MAX_VALUE))
				    .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				        .addComponent(jTextField_add_operations, GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE)
				        .addGap(0, 7, Short.MAX_VALUE))
				    .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				        .addComponent(jTextField_NOP_operations, GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE)
				        .addGap(0, 7, Short.MAX_VALUE))
				    .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				        .addComponent(jTextField_cfus_configured, GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE)
				        .addGap(0, 7, Short.MAX_VALUE))
				    .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				        .addComponent(jTextField_ram_accesses, GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE)
				        .addGap(0, 7, Short.MAX_VALUE))
				    .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				        .addComponent(jTextField_register_accesses, GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE)
				        .addGap(0, 7, Short.MAX_VALUE))
				    .addGroup(thisLayout.createSequentialGroup()
				        .addComponent(jTextField_mul_operations, GroupLayout.PREFERRED_SIZE, 69, GroupLayout.PREFERRED_SIZE)
				        .addGap(0, 0, Short.MAX_VALUE)))
				.addContainerGap(282, 282));
			thisLayout.linkSize(SwingConstants.HORIZONTAL, new Component[] {jLabel_CFUs_reconfigurations, jLabel_NOP_operations, jLabel_no_additions, jLabel_left_operations, jLabel_register_accesses, jLabel_right_shift_operations, jLabel_MAC_operations, jLabel_ADM_operations});
			pack();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
